Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({url:'setup.js'});
var tab1 = Titanium.UI.createTab({icon:'KS_nav_views.png',title:'Setup',window:win1});


var win2 = Titanium.UI.createWindow({url:'popUI.js'});
var tab2 = Titanium.UI.createTab({icon:'KS_nav_ui.png',title:'USB/Network',window:win2});

tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  
tabGroup.open();

Titanium.App.addEventListener("setTab",sTab);

function sTab(e){
	tabGroup.setActiveTab(e.tab)
	Titanium.App.ip=e.ip;
}